package cn.yuanqiao.archive.appManager.domain;

import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotNull;

/**
 * applymodel对象 YQDA_APPLY_MODEL
 * 
 * @author 赵常飞
 * @date 2023-06-16
 */
public class TenantApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_APPLY";

    public TenantApply() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** 主键id */
    @IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long Id;

    /** 菜单Id */
    @NotNull(message = "请选择菜单")
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long menuId;

    /** 门类Id */
    @NotNull(message = "请选择门类")
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long categoryId;

    /** 件层列表展示字段 */
    private String jianlistfield;

    /** 卷层列表展示字段 */
    private String juanlistfield;

    /** 项目层列表展示字段 */
    private String xiangmulistfield;

    /** 电子文件层展示字段 */
    private String efilelistfield;

    /** 件层添加字段 */
    private String jianaddfield;

    /** 卷层添加字段 */
    private String juanaddfield;

    /** 项目层添加字段 */
    private String xiangmuaddfield;

    /** 电子文件层添加字段 */
    private String efileaddfield;

    /** 件层更新字段 */
    private String jianupdatefield;

    /** 卷层更新字段 */
    private String juanupdatefield;

    /** 项目层更新字段 */
    private String xiangmuupdatefield;

    /** 电子文件层更新字段 */
    private String efileupdatefield;

    /** 件层导出字段 */
    private String jianexportfield;

    /** 卷层导出字段 */
    private String juanexportfield;

    /** 项目层导出字段 */
    private String xiangmuexportfield;

    /** 电子文件层导出字段 */
    private String efileexportfield;

    /** 件层查询字段 */
    private String jianquery;

    /** 卷层查询字段 */
    private String juanquery;

    /** 项目层查询字段 */
    private String xiangmuquery;

    /** 电子文件查询字段 */
    private String efilequery;

    /** 件层排序 */
    private String jianorder;

    /** 卷层排序 */
    private String juanorder;

    /** 项目层排序 */
    private String xiangmuorder;

    /** 电子文件层排序 */
    private String efileorder;

    /** 多个menuIds */
    private String menuIds;

    public String getEfilelistfield() {
        return efilelistfield;
    }

    public void setEfilelistfield(String efilelistfield) {
        this.efilelistfield = efilelistfield;
    }

    public String getEfileaddfield() {
        return efileaddfield;
    }

    public void setEfileaddfield(String efileaddfield) {
        this.efileaddfield = efileaddfield;
    }

    public String getEfileupdatefield() {
        return efileupdatefield;
    }

    public void setEfileupdatefield(String efileupdatefield) {
        this.efileupdatefield = efileupdatefield;
    }

    public String getEfileexportfield() {
        return efileexportfield;
    }

    public void setEfileexportfield(String efileexportfield) {
        this.efileexportfield = efileexportfield;
    }

    public String getEfilequery() {
        return efilequery;
    }

    public void setEfilequery(String efilequery) {
        this.efilequery = efilequery;
    }

    public String getEfileorder() {
        return efileorder;
    }

    public void setEfileorder(String efileorder) {
        this.efileorder = efileorder;
    }

    public String getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(String menuIds) {
        this.menuIds = menuIds;
    }

    public void setId(Long Id)
    {
        this.Id = Id;
    }

    public Long getId() 
    {
        return Id;
    }
    public void setMenuId(Long menuId) 
    {
        this.menuId = menuId;
    }

    public Long getMenuId() 
    {
        return menuId;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setJianlistfield(String jianlistfield) 
    {
        this.jianlistfield = jianlistfield;
    }

    public String getJianlistfield() 
    {
        return jianlistfield;
    }
    public void setJuanlistfield(String juanlistfield) 
    {
        this.juanlistfield = juanlistfield;
    }

    public String getJuanlistfield() 
    {
        return juanlistfield;
    }
    public void setXiangmulistfield(String xiangmulistfield) 
    {
        this.xiangmulistfield = xiangmulistfield;
    }

    public String getXiangmulistfield() 
    {
        return xiangmulistfield;
    }
    public void setJianaddfield(String jianaddfield) 
    {
        this.jianaddfield = jianaddfield;
    }

    public String getJianaddfield() 
    {
        return jianaddfield;
    }
    public void setJuanaddfield(String juanaddfield) 
    {
        this.juanaddfield = juanaddfield;
    }

    public String getJuanaddfield() 
    {
        return juanaddfield;
    }
    public void setXiangmuaddfield(String xiangmuaddfield) 
    {
        this.xiangmuaddfield = xiangmuaddfield;
    }

    public String getXiangmuaddfield() 
    {
        return xiangmuaddfield;
    }
    public void setJianupdatefield(String jianupdatefield) 
    {
        this.jianupdatefield = jianupdatefield;
    }

    public String getJianupdatefield() 
    {
        return jianupdatefield;
    }
    public void setJuanupdatefield(String juanupdatefield) 
    {
        this.juanupdatefield = juanupdatefield;
    }

    public String getJuanupdatefield() 
    {
        return juanupdatefield;
    }
    public void setXiangmuupdatefield(String xiangmuupdatefield) 
    {
        this.xiangmuupdatefield = xiangmuupdatefield;
    }

    public String getXiangmuupdatefield() 
    {
        return xiangmuupdatefield;
    }
    public void setJianexportfield(String jianexportfield) 
    {
        this.jianexportfield = jianexportfield;
    }

    public String getJianexportfield() 
    {
        return jianexportfield;
    }
    public void setJuanexportfield(String juanexportfield) 
    {
        this.juanexportfield = juanexportfield;
    }

    public String getJuanexportfield() 
    {
        return juanexportfield;
    }
    public void setXiangmuexportfield(String xiangmuexportfield) 
    {
        this.xiangmuexportfield = xiangmuexportfield;
    }

    public String getXiangmuexportfield() 
    {
        return xiangmuexportfield;
    }
    public void setJianquery(String jianquery) 
    {
        this.jianquery = jianquery;
    }

    public String getJianquery() 
    {
        return jianquery;
    }
    public void setJuanquery(String juanquery) 
    {
        this.juanquery = juanquery;
    }

    public String getJuanquery() 
    {
        return juanquery;
    }
    public void setXiangmuquery(String xiangmuquery) 
    {
        this.xiangmuquery = xiangmuquery;
    }

    public String getXiangmuquery() 
    {
        return xiangmuquery;
    }
    public void setJianorder(String jianorder) 
    {
        this.jianorder = jianorder;
    }

    public String getJianorder() 
    {
        return jianorder;
    }
    public void setJuanorder(String juanorder) 
    {
        this.juanorder = juanorder;
    }

    public String getJuanorder() 
    {
        return juanorder;
    }
    public void setXiangmuorder(String xiangmuorder) 
    {
        this.xiangmuorder = xiangmuorder;
    }

    public String getXiangmuorder() 
    {
        return xiangmuorder;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("Id", getId())
            .append("menuId", getMenuId())
            .append("categoryId", getCategoryId())
            .append("jianlistfield", getJianlistfield())
            .append("juanlistfield", getJuanlistfield())
            .append("xiangmulistfield", getXiangmulistfield())
            .append("jianaddfield", getJianaddfield())
            .append("juanaddfield", getJuanaddfield())
            .append("xiangmuaddfield", getXiangmuaddfield())
            .append("jianupdatefield", getJianupdatefield())
            .append("juanupdatefield", getJuanupdatefield())
            .append("xiangmuupdatefield", getXiangmuupdatefield())
            .append("jianexportfield", getJianexportfield())
            .append("juanexportfield", getJuanexportfield())
            .append("xiangmuexportfield", getXiangmuexportfield())
            .append("jianquery", getJianquery())
            .append("juanquery", getJuanquery())
            .append("xiangmuquery", getXiangmuquery())
            .append("jianorder", getJianorder())
            .append("juanorder", getJuanorder())
            .append("xiangmuorder", getXiangmuorder())
            .toString();
    }
}
